package com.yhsoft.buyer.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 购物车
 * </p>
 *
 * @author yyyyyyyh
 * @since 2023-09-26
 */
@TableName("buyer_cart")
@Data
public class BuyerCart implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 购物车ID
     */
    @TableId(value = "cart_id", type = IdType.AUTO)
    private Integer cartId;

    /**
     * 购物车编号
     */
    private String cartNum;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 商品Id
     */
    private Integer goodsId;

    /**
     * 总金额
     */
    private BigDecimal totalPrice;

    /**
     * 购物车状态 0-初始状态 1-已下单不在列表展示
     */
    private Integer cartStatus;

    /**
     * 逻辑删除
     */
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime updatedTime;

}
